package com.zzg.controller;

import com.zzg.entity.Price;
import com.zzg.note.AdviceAnnotation;
import com.zzg.service.PriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @author zzg
 * @version 1.0.0
 * @ClassName：PriceController
 * @Description: 描述
 * @date 2021/7/12
 **/
@Controller
public class PriceController {
    @Autowired
    private PriceService priceServiceImpl;

    @AdviceAnnotation(name = "查询价格表")
    @RequestMapping(value = "/PriceList",produces = "application/json;charset=utf-8")
    @ResponseBody
    public Map<String, Object> priceList(Integer page, Integer limit){
        return priceServiceImpl.priceList(page,limit);
    }
    @AdviceAnnotation(name = "修改价格表使用行目")
    @RequestMapping(value = "/PriceUpdate",produces = "application/text;charset=utf-8")
    @ResponseBody
    public String priceUpdate(Integer priceId){
        return priceServiceImpl.priceUpdate(priceId);
    }
    @AdviceAnnotation(name = "查询价格表使用的行数据")
    @RequestMapping(value = "/PriceId",produces = "application/json;charset=utf-8")
    @ResponseBody
    public Price priceId(){
        return priceServiceImpl.priceId();
    }
}
